<%@page contentType="text/html; charset=utf-8" language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" session="false"%>
<%
 String s_fullua = request.getHeader("user-agent"); 
 String ip =request.getRemoteAddr();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.3; minimum-scale=1.0; maximum-scale=2.0"/>
<meta http-equiv="Cache-Control" content="max-age=0" />
<meta http-equiv="Cache-control" content="no-cache" />
<title>浏览器信息</title>
</head>
<body>
<p>
ip:<%=ip%><br/>
ua:<%=s_fullua%><br/>
头信息：<br/>
<% Enumeration e = request.getHeaderNames();
String s = "";
while (e.hasMoreElements()) {
   String key = (String) e.nextElement();
   String value = request.getHeader(key);
   if(key.equalsIgnoreCase("X-Forwarded-For-Pound")){
    key="ip:";
   }
   s = s + key  + "=" + value + "\t";
%>
<%=key%>=<%=value%><br/>   
<%}%>
</p>
</body>
</html>